package data;

import java.util.Date;
import java.sql.*;

/**
 *
 * @author Alejandro
 */
public class Conector {
    public Conector(){ 
        
    }

    public Connection darConexion() {
        String url = "jdbc:mysql://localhost:3306/";
        String dbName = "be";
        String driverName = "com.mysql.jdbc.Driver";
        String userName = "root";
        String password = "my.bases";
        Connection con = null;
        try {
            Class.forName(driverName).newInstance();
            con = DriverManager.getConnection(url + dbName, userName, password);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
        
        return con;
    }
}
